You can insert a comment with
* This is a hsc-comment *
You can also nest such comments.
And you can comment out sections of html-source without any problems
for the browser. This simply is possible because comments in the
HSC-source are not written to the HTML-object.
Of course, if you need the standard comments, you can use
!-- This is a html/sgml-comment --
as usual.
A shell command can be executed with
<$source PRE>
<$exec COMMAND="command">
$source>
An example usage would be to insert a listing of a
directory:
<$include FILE="exmpl/exec.hsc" SOURCE PRE>
And the data created by this code sequence would look
like this:
<$include FILE="exmpl/exec.hsc">
If the command's return code is not equal to zero, a
warning message will be displayed.
As there is a lot to tell about this feature, it has it's
own page.
A -file can be included to the text using
$include FILE="filename" [SOURCE] [PRE]
If you include a file this way, it is handled as an usual
-file. That means, all tags and special characters are
handled as before.
To include a source file, eg a C- or HTML-source so that the
tags are not interpreted but displayed, add the optional
boolean attribute SOURCE
.
$include FILE="hugo.c" SOURCE
Now the basic special characters "<", ">" and "&" are
replaced by their entities.
Note that this does not include a PRE-tag
to render the text as it exists with the same line breaks and
spaces.
To get this done, you should use the optional boolean attribute
PRE
. This inserts a PRE before the included
data and a /PRE afterwards.
You can insert several stuff using the tag
$insert what [options]
Insert current date and time
You can insert the current date and time simply by
$insert TIME
using a default format.
Optionally, you can pass a format-string, that discribes the time.
As just calls the ANSI-C function
strftime()
to perform that task, you can use the same format specifications.
Example:
$insert TIME FORMAT="%b %d %y"
inserts current date with the strange ANSI-C
__TIME__
-format.
Insert text
As an required argument, you must give a string
that contains the text. Example:
$insert TEXT="hugo was here!"
inserts the text "hugo was here
". Of course, this does not
make much sense.$insert TEXT="..." is suggested to be used
with attribute values. Example:
$insert TEXT=<href>
inserts the value of the macro-attribute href
.
You can create an attribute and pass a value to it via
$define attribute
If you define an attribute via $define inside a macro, it is of
local existence only and is removed after processing the macro. You
can suppress this with using the attribute flag /GLOBAL
: in
this case, the attribute exists until the end of conversion.
You can use the flag /CONST
to make the attribute read-only.
That means it can't be overwritten by $let
You can update an attribute's value with
$let attribute_name =
new_value
Example:
<$source PRE>
<$define hugo:string="hugo"> <* create hugo and set to "hugo" *>
<$let hugo=(hugo+" ist doof.")> <* update it to "hugo ist doof." *>
$source>
I think, this feature needs an
own page...
During conversion, you can invoke messages by yourself using
<$source PRE>
<$message TEXT="message text" [CLASS="class"]>
$source>
For an example, look at $exec.
This tag is used to insert data of attributes an
expressions. For example:
<$source PRE>
<$define hugo:string="hugo"> <* create hugo and set to "hugo" *>
<(hugo+" ist doof.")> <* insert text "hugo ist doof." *>
$source>
If you created some perverted HTML source or use features
can't handle (which is theoretically impossible), you
can keep of from parsing this section by surrounding it with
| ... |. Of course, this is a dirty hide-out and should
be used only for special cases.
This tag should be used within hsc.prefs only. It defines
a new entity.
This tag should be used within hsc.prefs only. It defines
a new tag, and is used quite similar to .